package my.edu.model.information.service;

import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;
import my.edu.common.domain.PageDTO;
import my.edu.common.domain.PageVO;
import my.edu.model.information.entity.Supplier;
import my.edu.model.information.entity.SupplierPayableBalanceDetail;
import my.edu.model.information.entity.VO.SupplierVO;
import my.edu.model.information.entity.dto.SupplierDTO;
import my.edu.model.information.entity.dto.SupplierSearchDTO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface ISupplierService extends IService<Supplier> {
    void savenew(SupplierDTO supplierDTO);

    PageVO<SupplierVO> listAll(PageDTO pageDTO, SupplierSearchDTO supplierSearchDTO);

    SupplierVO getVOById(String id);

    void updateByDTO(SupplierDTO supplierDTO);

    void addPayableBalanceDetails(SupplierPayableBalanceDetail supplierPayableBalanceDetail);

    void addPayableBalanceDetails(List<SupplierPayableBalanceDetail> supplierPayableBalanceDetailList);

    void removePayableBalanceDetails(List<Long> ids, String billsType);

    void subPayableBalance(Map<Long, BigDecimal> supplierIdrAndAmount) ;

    void addPayableBalance(Map<Long, BigDecimal> supplierIdrAndAmount);

    //会先删去idList里面的数据
    void updatePayableBalanceDetails( List<Long> idList, List<SupplierPayableBalanceDetail> list);
    //直接修改
    void updatePayableBalanceDetails(SupplierPayableBalanceDetail payableBalance);

    void setStatus(List<Long> longs, int status);

    JSONArray listOnly();

    void checkSupplier(Long id);

}
